import request from "@/utils/request";

export function getCat(params) {
  return request({
    url: "/admin/api/rest/categories",
    params
  });
}
export function addCat(data) {
  return request({
    url: "/admin/api/rest/categories",
    method: "POST",
    data
  });
}
export function editCat(data) {
  return request({
    url: "/admin/api/rest/categories",
    method: "PATCH",
    data
  });
}
export function deleteCat(data) {
  return request({
    url: "/admin/api/rest/categories",
    method: "DELETE",
    data
  });
}
